<?php       
session_start(); 
include('cgi/system/connect.php'); 
$id = $_SESSION['symfony/user/sfUser/attributes']['sfGuardSecurityUser']['user_id'];    
$sql = "select `account`,`gender` from `sf_guard_user` where id = $id limit 0,1";
$user_data = mysql_query($sql);
while ($row = mysql_fetch_assoc($user_data)) {
    $user = $row;
}                   
$account = $user['account'];  
$gender = $user['gender'];  
$account = (int) $account; 
if (($gender == 'm') && ($account <= 0)) {                          
    header('Location: http://alika-love-agency.com/en/account_index.html'); 
    exit();
}                                
if (!empty($id)) { 
    $_SESSION['my_id'] = $id;        
    header('Location: chat.php');  
} else {                            
    header('Location: http://alika-love-agency.com/en/registration.html');
}           
?>
<h1>What?!</h1>